home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / ShareMailGiftware / AmigaTalk / testfiles / TestPrinter < prev    next >
Text File  |  2002-10-27  |  2KB  |  97 lines

  1. prtCmds <- PrtCommands   new
  2. myPrt   <- PrinterDevice new
  3.  
  4. myPrt open: 'TestThePrinter'
  5.  
  6. myPrt reset
  7.  
  8. myPrt nlqOn
  9.  
  10. myPrt setTopMargin: 5
  11.  
  12. finePrt <- prtCmds at: #aSHORP4
  13.  
  14. myPrt sendExtendedCmd: finePrt parm1: 0 parm2: 0 parm3: 0 parm4: 0
  15.  
  16. myPrt write: 'Fine Print!' ofLength: 11
  17.  
  18. myPrt crlf
  19.  
  20. myPrt setLeftMargin: 20
  21.  
  22. myPrt write: '(Fine Print 2)' ofLength: 14
  23.  
  24. myPrt superScriptOn
  25. myPrt write: 'superScript!' ofLength: 12 
  26. myPrt superScriptOff
  27. myPrt normalizeLine
  28.  
  29. myPrt nlqOff
  30.  
  31. myPrt crlf
  32.  
  33. myPrt normalPitch
  34.  
  35. myPrt write: 'Normal Pitch!' ofLength: 13
  36.  
  37. myPrt crlf
  38.  
  39. myPrt italicsOn
  40. myPrt write: 'Italicized Text!' ofLength: 16
  41. myPrt italicsOff
  42. myPrt crlf
  43.  
  44. myPrt underlineOn
  45. myPrt write: 'Underlined Text!' ofLength: 16
  46. myPrt underlineOff
  47. myPrt crlf
  48.  
  49. myPrt boldOn
  50. myPrt write: 'BoldFaced Text!' ofLength: 15
  51. myPrt boldOff
  52. myPrt crlf
  53.  
  54. chk <- myPrt query
  55.  
  56. ( 'Printer status was:  ', (chk asString) ) print
  57.  
  58. chk <- myPrt getPrinterName
  59.  
  60. ( 'Printer Driver name is:  ', chk ) print
  61.  
  62. chk <- myPrt getPrinterClassString
  63.  
  64. ( 'Printer Class is:  ', chk ) print
  65.  
  66. chk <- myPrt getNumberOfCharSets
  67.  
  68. ( 'Printer has ', (chk asString), ' character sets.' ) print
  69.  
  70. myPrt setTabs: 10 t2: 20 t3: 30 t4: 04
  71.  
  72. tab <- <primitive 96 9>
  73.  
  74. myPrt asyncWrite: tab ofLength: 1
  75. myPrt asyncWrite: tab ofLength: 1
  76.  
  77. myPrt condensedPitchOn
  78.  
  79. myPrt asyncWrite: 'asyncWrite: test' ofLength: 16
  80. myPrt crlf
  81.  
  82. myPrt clearTabs
  83.  
  84. myPrt asyncWrite: 'asyncWrite: test' ofLength: 16
  85.  
  86. myPrt crlf
  87. myPrt crlf
  88. myPrt crlf
  89.  
  90. myPrt initialize: '@Mp'
  91. myPrt write: 'Elite proportional italic' ofLength: 26
  92.  
  93. myPrt sendFormFeed
  94.  
  95. myPrt flush 
  96. myPrt close
  97.